<template>
    <h1>这是一个全局声明的例子</h1>
    <button @click="clickFn">这个按钮调用全局方法{{ count }}</button>
    <br>
    <p>tellMe: {{ tellMeText }}</p>
    <div>
        <p>需要在ts 配置中设置允许在没有 import/export 的 ts文件中 declare</p>
        <pre>
{
  "extends": "@vue/tsconfig/tsconfig.web.json",
  "include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    },
    "isolatedModules": false
  }
        </pre>
        <p>其他相关文件</p>
        <p>global-def-impl.ts</p>
        <p>global-defination.vue</p>
        <p>global-methos.d.ts</p>
    </div>

    <h3>TODO ，这会不会造成全局污染呀？</h3>
</template>
<script setup lang="ts">

import { ref } from 'vue';
const count = ref(0)
const tellMeText = ref('')
const clickFn = () => {
    tellMeText.value = tellMe((count.value++) + '')
}
</script>